#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <myserial.h>
#include <qthread.h>
#include <qfile.h>
#include <qfiledialog.h>
#include <qstandardpaths.h>
#include <qserialport.h>
#include <qserialportinfo.h>
#include <qmessagebox.h>
#include <qthread.h>
#include <sendfile.h>
#include <qtimer.h>
#include "qsettings.h"

namespace Ui {
class MainWindow;
}

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    explicit MainWindow(QWidget *parent = 0);
    ~MainWindow();

    void dis_available_port(QList<QSerialPortInfo> info);

signals:
    bool open_serial_port(QString name);
    void tc();
    void setsendfilename(QString);
    void getavaliableport();


private slots:
    void on_PB_Open_clicked();

    void on_PB_Select_clicked();

    void showmsg(QString);

    void showwarning(QString);

    void on_PB_Scan_clicked();

    void prameter_init();

    void showaboutqt();

private:
    Ui::MainWindow *ui;
    myserial serial;
    sendfile filesend;
    QTimer timscan;
    QSettings* setting;

};

#endif // MAINWINDOW_H
